home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 322 / unetnote / gemshell.c next >
Encoding:
C/C++ Source or Header  |  1988-10-20  |  1.3 KB  |  32 lines

  1.  
  2. /* gemshell.c   forms gemshell.tos  STdNet-StPaulMN  17Sep88  CJPurcell */
  3. /* "one-liner" shell to compile w/gcc on an ATARI-1040ST or ATARI-520+  */
  4. #include <osbind.h> /* provides maximum available execute space in 1meg */
  5. /* eventually,read this info from an initialization file, i.e., gnu.rc  */
  6. static char *envp[] = { "gcc=g:\\exec\\gcc.ttp",
  7.                         "cc1=g:\\exec\\gcc-cc1.ttp",
  8.                         "cpp=g:\\exec\\gcc-cpp.ttp",
  9.                         "ld=g:\\exec\\gcc-ld.ttp",
  10.                         "as=g:\\exec\\gcc-as.ttp",
  11.                         "GCCEXEC=g:\\exec\\gcc-",
  12.                         "INCLUDE=g:\\include",
  13.                         "GNULIB=g:\\lib",
  14.                         "TEMP=p:",
  15.                         "PATH=",
  16.                         "A:\\",
  17.                         0      };
  18. main()       {
  19.    unsigned char buffer[130];
  20.    int       status;
  21.    buffer[0] = 128;
  22.    Cconws("gccGEMshell Enter:  command_line_string   (^C exits)\r\n:");
  23.    Cconrs(buffer);
  24.    Cconws("\r\n");
  25.    buffer[1] = ' ';   /*   command buffer mandatory space prefix */ 
  26.                       /* 0 selects loadgo                        */
  27.    status = (int) Pexec(  0 , "g:\\exec\\gcc.ttp", &buffer[1], *envp );
  28.    Cconws("\r\n Pause to read compiler messages; Any key continues: \r\n");
  29.    Bconin(2);
  30.    return(status);
  31. }
  32.